<%@ page pageEncoding="UTF-8"%>
<%@ taglib prefix="form" uri="http://www.springframework.org/tags/form"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn"%>
<%@ taglib prefix="isperp" uri="/WEB-INF/tlds/isperp.tld"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt"%>

<div class="box no-border">
	<div class="header">
		<h3>资产基本信息</h3>
	</div>
	<table class="form-table">
		<tr>
			<td class="td1">资产编号：</td>
			<td class="td2"><em>${model.code }</em>
			</td>
			<td class="td1">资产类别：</td>
			<td class="td2">${model.confCategoryName }</td>
		</tr>
		<tr>
			<td class="td1">资产名称：</td>
			<td class="td2">${model.name }</td>
			<td class="td1">状态：</td>
			<td class="td2">${model.status }</td>
		</tr>
		<tr>
			<td class="td1">使用者：</td>
			<td class="td2">${model.useStaffName }</td>
			<td class="td1">位置：</td>
			<td class="td2">${model.address }</td>

		</tr>
		<tr>
			<td class="td1">维保日期：</td>
			<td class="td2" colspan="3"><fmt:formatDate
					value="${model.maintainerStartDate}" pattern="yyyy-MM-dd" /> 至 <fmt:formatDate
					value="${model.maintainerEndDate}" pattern="yyyy-MM-dd" /></td>
		</tr>

	</table>
	<div id="ciResumeTabs" class="box tabs">
		<div class="header">
			<ul>
				<li><a href="#ciIncidentHistory">事件履历(${fn:length(incedentEntities)})</a>
				</li>
				<li><a href="#ciChangeHistory">变更履历(${fn:length(changeEntities)})</a>
				</li>
				<li><a href="#ciDataChangeHistory">数据变更日志(${fn:length(dataChangeEntities)})</a>
				</li>
				<li><a href="#relatedTaskCiAudit">资产审计履历(${fn:length(auditEntities)})</a>
				</li>
			</ul>
			<h2>&nbsp;</h2>
		</div>
		<div style="padding:0" class="content tabbed">
			<div id="ciIncidentHistory">
				<div class="ci-failure-info">
					<c:forEach items="${incedentEntities}" var="incident">
						<table class="comment">
							<tr>
								<td class="header" colspan="2">发生时间：<fmt:formatDate
										value="${incident.create_date}" pattern="yyyy-MM-dd HH:mm" />
									&nbsp;&nbsp;申请人：<a class="nui-txt-link"
									href="javascript:void(0)"
									onclick="javascript:isperp.openDialog({windowSize:'normal',contentUrl:'customer/user/view?id=${incident.cus_user_id}'});return false;">${incident.cus_user_name}</a>&nbsp;&nbsp;事件编号:
									<a class="nui-txt-link"
									href="javascript:isperp.openDialog({contentUrl:'incident/incident/view?id=${incident.id}'});">${incident.code}</a>
								</td>
							</tr>

							<tr>
								<td class="tdCaption">标题:</td>
								<td class="tdContent">${incident.title}</td>
							</tr>
							<tr>
								<td class="tdCaption">事件描述:</td>
								<td class="tdContent">${incident.description}</td>
							</tr>

							<tr>
								<td class="buttom" colspan="2">解决人：<a href=""
									onclick="isperp.openDialog({contentUrl:'app/user/view?id=${incident.solver_id}'});return false;">${incident.solver_name}</a>&nbsp;&nbsp;解决时间：<fmt:formatDate
										value="${incident.solved_date}" pattern="yyyy-MM-dd HH:mm" />
								</td>
							</tr>
						</table>

					</c:forEach>
				</div>
			</div>

			<div id="ciChangeHistory">
				<div class="ci-failure-info">


					<c:forEach items="${changeEntities}" var="change">
						<table class="comment">
							<tr>
								<td class="header" colspan="2">发生时间：<fmt:formatDate
										value="${change.create_date}" pattern="yyyy-MM-dd HH:mm" />
									&nbsp;&nbsp;申请人： ${change.requester_name}&nbsp;&nbsp;编号: <a
									class="nui-txt-link"
									href="javascript:isperp.openDialog({contentUrl:'change/change/view?id=${change.id}'});">${change.code}</a>
								</td>
							</tr>

							<tr>
								<td class="tdCaption">变更标题:</td>
								<td class="tdContent">${change.title}</td>
							</tr>
							<tr>
								<td class="tdCaption">变更描述:</td>
								<td class="tdContent">${change.description}</td>
							</tr>
							<tr>
								<td class="buttom" colspan="2">实施者：${change.executer_name}&nbsp;&nbsp;实施时间：<fmt:formatDate
										value="${change.execute_time}" pattern="yyyy-MM-dd HH:mm" />
								</td>
							</tr>
						</table>

					</c:forEach>
				</div>

			</div>

			<div id="ciDataChangeHistory">
				<div class="ci-failure-info">
					<c:forEach items="${dataChangeEntities}" var="dataChange">
						<table class="comment">
							<tr>
								<td class="header" colspan="2">修改时间： <fmt:formatDate
										value="${dataChange.create_date}" pattern="yyyy-MM-dd HH:mm" />
									&nbsp;&nbsp;修改人： <a>${dataChange.creator_name}</a>&nbsp;&nbsp;关联变更单:
									<c:if test="${not empty dataChange.change_id }">
										<a
											href="javascript:isperp.openDialog({contentUrl:'change/change/view?id=${dataChange.change_id}'});">${dataChange.code}【${dataChange.title}】</a>
									</c:if> <c:if test="${empty dataChange.change_id }">
										<a>无</a>
									</c:if></td>
							</tr>

							<tr>
								<td class="tdCaption">基本属性:</td>
								<td class="tdContent">${dataChange.db_desctiption}</td>
							</tr>
							<tr>
								<td class="tdCaption">自定义属性:</td>
								<td class="tdContent">${dataChange.description}</td>
							</tr>
						</table>
					</c:forEach>
				</div>
			</div>
			
			<div id="relatedTaskCiAudit">
				<div class="ci-failure-info">

           <c:forEach items="${auditEntities}" var="task">
					<table class="comment">
						<tr>
							<td class="header" colspan="2">发生时间：<fmt:formatDate
									value="${task.create_date}" pattern="yyyy-MM-dd HH:mm" />
								&nbsp;&nbsp;负责人： ${task.plan_principal_name}&nbsp;&nbsp;编号: <a
								class="nui-txt-link"
								href="javascript:isperp.openDialog({contentUrl:'task/task/view?id=${task.id}'});">${task.code}</a>
							</td>
						</tr>

						<tr>
							<td class="tdCaption">标题:</td>
							<td class="tdContent">${task.name}</td>
						</tr>
						<tr>
							<td class="tdCaption">描述:</td>
							<td class="tdContent">${task.content}</td>
						</tr>
						<tr>
							<td class="tdCaption">审计结果:</td>
							<td class="tdContent">${task.task_ciaudit_result}</td>
						</tr>
						<tr>
							<td class="tdCaption">审计日期:</td>
							<td class="tdContent">
							<fmt:formatDate value="${task.task_ciaudit_date}" pattern="yyyy-MM-dd" />
							
							</td>
						</tr>
						
					</table>

				</c:forEach>
				</div>

			</div>
			
		</div>
	</div>
</div>
<script type="text/javascript">
	$("#ciResumeTabs").tabs();
</script>



